<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
	String contentPath = request.getContextPath();
%>
<head>
<title>Insert title here</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contentPath %>/easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="<%=contentPath %>/easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="<%=contentPath %>/css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="<%=contentPath %>/css/Tooltip.css" />
<script src="<%=contentPath %>/easyui/jquery-1.4.4.min.js"></script>
<script src="<%=contentPath %>/easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="<%=contentPath %>/myjs/myTab.js"></script>
<!-- sys -->
<script src="<%=contentPath %>/myjs/sys.js"></script>
<script src="<%=contentPath %>/easyui/easyMask.js"></script>
<script src="<%=contentPath %>/easyui/easyUI.js"></script>
<script src="<%=contentPath %>/easyui/easyLayer.js"></script>
<script src="<%=contentPath %>/myjs/casePropertyMananger.js"></script>
<script src="<%=contentPath %>/myjs/calendar.js"></script>
<script src="<%=contentPath%>/myjs/DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
	var proName = '<%=contentPath%>';
	var greyLayer ;
	$(function(){
	//	ESONCalendar.bind("warehousing_date");
		grid = $('#tt').datagrid({
			url:'<%=contentPath%>/casePropertyManager/getCaseGoods',
			pagination:true,
			singleSelect:true,
			fit:true,//表格自动填充
			loadMsg:'正在努力为您加载，请稍作等待…',//加载信息
			idField : 'good_id', //指示该字段是一个标识字段。
			pageNumber : 1, //当前页码
			pageSize:10,
			
			nowrap : true,
			striped : true, //隔行换色
			collapsible : false,
			sortName : 'case_num', //排序的列
			sortOrder : 'asc', //asc  or  desc
			remoteSort : false, //远程排序
			
			
			toolbar:[{
				text:'查询',
				iconCls : 'icon-search',
				 handler:'search'
			},'-',{
				text:'警综物品登记',
				iconCls:'icon-edit',
				handler:'oGoods'
			},'-',{
				text:'新增登记',
				iconCls:'icon-add',
			 	handler:'nGoods'
				
			},'-',{
				text:'打印',
				iconCls:'icon-function'
				// handler:'func_sys_priv_menu'
			},'-',{
				text:'查看明细',
				iconCls:'icon-function'
				// handler:'func_sys_priv_menu'
			}]
			
		});
		
		//初始化pagination工具开始
		var pagetool = $('#tt').datagrid('getPager');
		pagetool.pagination({				
				beforePageText:'第',
				afterPageText:'页，共{pages}页',
				displayMsg:'显示从 {from} 到  {to} , 总记录 {total} '});
		//初始化pagination工具结束
					
	
		$('body').layout();
		$('#btn-save,#btn-cancel').linkbutton();

		$('#WPSBDW').combobox({
			url:proName+"/casePropertyStorage/getCompanyInfo",
			multiple:false,
			onChange:function(newValue,oldValue){  
				$('#WPSBDW').val(newValue);
			}
		});
		$('#AJLB_S').combobox({
			url:proName+"/dicManager/getChildListByPcode?p_code=15",
			multiple:false,
			onChange:function(newValue,oldValue){  
				$('#AJLB_S').val(newValue);
			}
		});
	    //新增物品
		win_func = $('#win_function').window({
			collapsible:false,
			minimizable:false, 
			maximizable:false, 
			closable:true,
			onClose:function(){greyLayer.close();},
			closed:true,
			cache:false						
		});	
		form_func = win_func.find('form');	
		greyLayer = new easyMask(null,'100%','100%',100,'#000',8,true);
	});
	
</script>
</head>
<body>

<div id="query_condition" region="center" style="overflow:hidden;padding: 1px 1px 1px 1px;">
<form action="post" id="queryForm">
<table id='search_table'>
	<tr>
		<td>案件编号：</td>
		<td><input type='text' id="AJBH" name='AJBH'/></td>
		<td>案件类别：</td>
		<td> 
				<input name="AJLB_S"  id="AJLB_S"  	type="text"   panelWidth="240px" valueField="c_code" textField="c_name" ></input>
		</td>
		<td>案件名称：</td>
		<td><input type='text' name='AJMC' id="AJMC"/></td>
	</tr>
	<tr>
		<td>办案单位：</td>
		<td><input type='text' id="WPSBDW" name='WPSBDW' valueField="company_code" textField="company_name" panelWidth="240px"/></input>
			</td>
		<td>办案民警：</td>
		<td><input type='text' name='WPSBR' id='WPSBR'/></td>
		<td>上报时间：</td>
		<td><input name="SBSJ" id="SBSJ" class="easyui-validatebox"
							type="text" onClick="WdatePicker({dateFmt:'yyyyMMdd'});"></input></td>
	</tr>
</table>
</form>
<table id="tt">
	<thead>
		<tr>
		    <th field="goods_id" width="80%" sortable=true>序号</th>
			<th field="goods_name" width="100%" class="easyui-validatebox" required="true">物品名称</th>
			<th field="goods_typeDesc" width="150%" class="easyui-validatebox" required="true">物品类型</th>
			<th field="case_num" width="160%" class="easyui-validatebox">案件编号</th>
			<th field="case_name" width="200%" class="easyui-validatebox">案件名称</th>
			<th field="save_company" width="200%" class="easyui-validatebox">物品处理单位</th>
			<th field="save_date" width="100%" class="easyui-validatebox">物品录入时间</th>
		</tr>
	</thead>
</table>
<div id="win_function" iconCls="icon-function" title="涉案物品入库登记"
	style="width: 600px; height: 375px;"  fit="true">
	<form method="post" enctype="multipart/form-data" id="sform">
	<input type='hidden' name='h_goods_id' id='h_goods_id'/>
	<input type='hidden' name='goods_desc' id='prop_desc'/>
	<input type='hidden' name='h_goods_kind' id='h_goods_kind'/>
	<input type='hidden' name='method' id='method'/>
	<table style="width: 100%; height: 375px;">
		<tbody id="disabled_Tbody" >
			<tr>
				<td >物品名称：</td>
				<td><input id="GOODS_NAME" name="GOODS_NAME" type='text'/></td>
				<td >涉案物品类型：</td>
				<td> 
						<input name="GOODS_TYPE"  id="GOODS_TYPE"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=1"
							valueField="c_code" textField="c_name" ></input>
					</td>
				<td >保管物品分类：</td>
				<td><input id="GOODS_KIND" name="GOODS_KIND"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=4"
							valueField="c_code" textField="c_name" ></td> 
			</tr>
			<tr>
				<td >物品价值：</td>
				<td><input id="GOODS_VALUES" name="GOODS_VALUES" type='text'/></td>
				<td >案件名称：</td>
				<td><input id="AJMC" name="AJMC" type='text'/></td>
				<td >案件类型：</td>
				<td> 
						<input name="AJLB"  id="AJLB"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=15"
							valueField="c_code" textField="c_name" ></input>
				</td>
			</tr>
			<tr>
				<td >案件状态：</td>
				<td> 
					<input name="AJZT"  id="AJZT"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=14"
							valueField="c_code" textField="c_name" ></input>
				</td>
				<td >简要案情：</td>
				<td colspan=3><input id="JYAQ" name="JYAQ" type='text' size="100"/></td>
			</tr>
		</tbody>
		<tbody>
			<tr>
				<td colspan='6'>
					<DIV style="margin: 5px 15px 14px 0px; border-top-color: rgb(204, 224, 194); border-top-width: 1px; border-top-style: dashed;"></DIV>
				</td>
			</tr>
		</tbody>
		<!-- 一般物品（3行） -->
		<tbody id="TBODY_01" style="">
			<tr id='YBWP_1'>
				<td>物品品牌：</td>
				<td><input type='text' id="ORDINARY_BRAND"  name='ORDINARY_BRAND'/></td>
				<td>物品型号：</td>
				<td><input type='text' id="ORDINARY_MODEL"  name='ORDINARY_MODEL'/></td>
				<td>物品数量：</td>
				<td><input type='text' id="ORDINARY_NUM" name='ORDINARY_NUM'/></td>
			</tr>
			<tr id='YBWP_2'>
				<td>物品重量：</td>
				<td><input type='text' id="ORDINARY_WEIGHT" name='ORDINARY_WEIGHT'/></td>
				<td>物品颜色：</td>
				<td>
					<input name="ORDINARY_COLOR"  id="ORDINARY_COLOR"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=16"
							valueField="c_name" textField="c_name" ></input>
				</td><!-- <input type='text' id="ORDINARY_COLOR" name='ORDINARY_COLOR'/> -->
				<td>物品质地：</td>
				<td><input type='text' id="ORDINARY_GRAIN" name='ORDINARY_GRAIN'/></td>
			</tr>
			<tr id='YBWP_3'>
				<td>物品厂牌：</td>
				<td><input type='text' id="ORDINARY_FAC" name='ORDINARY_FAC'/></td>
				<td>物品特征描述：</td>
				<td colspan='2'><input type='text' onkeyup='myKeyUp(this)' id='TBODY_02_WPTZ' name='WPTZ'/></td>
			</tr>
		</tbody>
		<!-- 现金、存折、银行卡、外币、有价证券(2行) -->
		<tbody id='TBODY_02' style="display:none">
			<tr id='YCYWY_1'>
				<td>票据种类：</td>
				<td> 
						<input name="cash_type"  id="cash_type"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=17"
							valueField="c_name" textField="c_name" ></input>
				</td>
				<td>票据面值：</td>
				<td><input type='text' id="cash_value" name='cash_value'/></td>
				<td>票据张数：</td>
				<td><input type='text' id="cash_num" name='cash_num'/></td>
			</tr>
			<tr id='YCYWY_2'>
				<td>票据价值：</td>
				<td><input type='text' id="cash_cost" name='cash_cost'/></td>
				<td>物品特征描述：</td>
				<td colspan='2'><input type='text' onkeyup='myKeyUp(this)' id='TBODY_01_WPTZ' name='WPTZ'/></td>
			</tr>
		</tbody>
		<!-- 文物、金银及其制品、珠宝、名贵字画(2行) -->
		<tbody id="TBODY_05" style="display:none">
			<tr id='WJZM_1'>
				<td>数量：</td>
				<td><input type='text' id="antique_num" name='antique_num'/></td>
				<td>等级：</td>
				<td> 
						<input name="antique_level"  id="antique_level"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=19"
							valueField="c_name" textField="c_name" ></input>
				</td>
				<td>颜色：</td>
				<td><input name="antique_color"  id="antique_color"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=16"
							valueField="c_name" textField="c_name" ></input>
				</td>
			</tr>
			<tr id='WJZM_2'>
				<td>质地：</td>
				<td><input type='text' id="antique_grain" name='antique_grain'/></td>
				<td>物品特征描述：</td>
				<td colspan='2'><input onkeyup='myKeyUp(this)' type='text' id='TBODY_06_WPTZ' name='WPTZ'/></td>
			</tr>
		</tbody>
		<!-- 录音带、录像带、电子数据存储介质(3行) -->
		<tbody id='TBODY_06' style='display:none'>
			<tr id='LLD_1'>
				<td>物品案由：</td>
				<td><input type='text' id="video_brief" name='video_brief'/></td>
				<td>物品对象:</td>
				<td><input type='text' id="video_obj" name='video_obj'/></td>
				<td>物品内容：</td>
				<td><input type='text' id="video_content" name='video_content'/></td>
			</tr>	
			<tr id='LLD_2'>
				<td>物品类别：</td>
				<td><input type='text' id="video_type" name='video_type'/></td>
				<td>文件格式:</td>
				<td><input type='text' id="video_mode" name='video_mode'/></td>
				<td>文件长度：</td>
				<td><input type='text' id="video_length" name='video_length'/></td>
			</tr>
			<tr id='LLD_3'>
				<td>录制时间：</td>
				<td><input type='text' id="video_date" name='video_date'/></td>
				<td>录制地点:</td>
				<td><input type='text' id="video_sub" name='video_sub'/></td>
				<td>物品特征描述：</td>
				<td><input type='text' onkeyup='myKeyUp(this)' id='TBODY_11_WPTZ' name='WPTZ'/></td>
			</tr>
		</tbody>
		<!-- 不动产(2行) -->
		<tbody id='TBODY_07' style="display:none">
			<tr id='BDC_1'>
				<td>登记证书：</td>
				<td><input type='text' id="immovable_ceri" name='immovable_ceri'/></td>
				<td>权属关系：</td>
				<td><input type='text' id="immovable_relatoin" name='immovable_relatoin'/></td>
				<td>性质：</td>
				<td><input type='text' id="immovable_quate" name='immovable_quate'/></td>
			</tr>
			<tr id='BDC_2'>
				<td>状态：</td>
				<td><input type='text' id="immovable_status" name='immovable_status'/></td>
				<td>有效期：</td>
				<td><input type='text' id="immovable_validity" name='immovable_validity'/></td>
				<td>物品特征描述：</td>
				<td><input type='text'  onkeyup='myKeyUp(this)' id='TBODY_08_WPTZ' name='WPTZ'/></td>
			</tr>
		</tbody>
		<!-- 车辆(3行) -->
		<tbody id='TBODY_13' style='display:none'>
			<tr id='CL_1'>
				<td>车牌号：</td>
				<td><input type='text' id="car_no" name='car_no'/></td>
				<td>号牌种类：</td>
				<td> 
					<input name="car_type"  id="car_type"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=18"
							valueField="c_name" textField="c_name" ></input>
				</td>
				<td>识别码：</td>
				<td><input type='text' id="car_spot" name='car_spot'/></td>
			</tr>
			<tr id='CL_2'>
				<td>行驶里程：</td>
				<td><input type='text' id="car_mileage" name='car_mileage'/></td>
				<td>车身颜色：</td>
				<td>
					<input name="car_color"  id="car_color"  class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=contentPath %>/dicManager/getChildListByPcode?p_code=16"
							valueField="c_name" textField="c_name" ></input>
				</td>
				<td>车辆状况：</td>
				<td><input type='text' id="car_status" name='car_status'/></td>
			</tr>
			<tr id='CL_3'>
				<td>车主姓名：</td>
				<td><input type='text' id="car_owner" name='car_owner'/></td>
				<td>车主身份证号：</td>
				<td><input type='text' id="car_idcard" name='car_idcard'/></td>
				<td>物品特征描述：</td>
				<td><input type='text'  onkeyup='myKeyUp(this)'  id='TBODY_13_WPTZ' name='WPTZ'/></td>
			</tr>
		</tbody>
		
		<tbody>
			 <tr>
				<td>上传图片：</td>
				<td><input type='file' name='goods_file'  id="goods_file"/></td>
			</tr> 
			<tr align="center"> 
			    <td >
			     	<a href="javascript:void(0)" onclick="save()" id="btn-save" icon="icon-save">保 存</a>
				 </td>
			</tr>
		</tbody>
		
	</table>
	</form>
</div>
</div>
</div>
</body>
</html>